package com.sunwayworld.basemodule.business.qualitycontrol.qualitycontrolresult.resource.impl;

import com.sunwayworld.basemodule.business.qualitycontrol.qualitycontrolresult.resource.LimsQualitycontrolTestBatchResource;
import com.sunwayworld.basemodule.business.qualitycontrol.qualitycontrolresult.service.LimsQualitycontrolTestBatchService;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogModule;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@LogModule("质控实验批次")
@RestController
@GikamBean
public class LimsQualitycontrolTestBatchResourceImpl implements LimsQualitycontrolTestBatchResource {

    @Autowired
    private LimsQualitycontrolTestBatchService limsQualitycontrolTestBatchService;

    @Override
    public LimsQualitycontrolTestBatchService getService() {
        return limsQualitycontrolTestBatchService;
    }

    @Log(value = "新增质控实验批次", type = LogType.INSERT)
    @Override
    @RequestMapping(method = RequestMethod.POST)
    public Long insert(RestJsonWrapperBean wrapper) {
        return getService().insert(wrapper);
    }

    @Override
    public String commitTo(RestJsonWrapperBean wrapper) {
        return getService().commitTo(wrapper);
    }
}
